package com.tengfei.broadcastreceiverdemo;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import androidx.appcompat.app.AppCompatActivity;

public class BaseBroadcastActivity extends AppCompatActivity {

    private Button mBt;
    private EditText mEt;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_base_broadcast);
        mBt = findViewById(R.id.btn_send);
        mEt = findViewById(R.id.et_ipt);
        listener();
    }

    private void listener() {
        mBt.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                String msg = mEt.getText().toString().trim();
                Intent intent = new Intent();
                intent.setAction("com.tengfei.broadcastreceiverdeme.SEND_MSG");
//                intent.putExtra("contnt",)
            }
        });
    }
}